package com.example.qinghe.service.sale;

import com.example.qinghe.dao.sale.CheckinrecordsMapper;
import com.example.qinghe.entity.sale.Checkinrecords;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class CheckinrecordsService {

    @Autowired
    private CheckinrecordsMapper dao;

    public Checkinrecords selectCheckinrecordsByLocationId(Long id){
        return dao.selectCheckinrecordsByLocationId(id);
    }

    public int CheckIn(Checkinrecords checkinrecords){
        return dao.CheckIn(checkinrecords);
    }

    public int CheckOut(@Param("id") Long id, @Param("checkoutTime") LocalDateTime checkoutTime){
        return dao.CheckOut(id,checkoutTime);
    }


}
